﻿using Authority.DataTransferObject.Role;
using Authority.DataTransferObject.Routing;
using Authority.IServices.Model.Role;

namespace Authority.IServices
{
    /// <summary>
    /// 角色权限服务
    /// </summary>
    public interface IRoleAuthorityService
    {
        /// <summary>
        /// 新增角色权限
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task AddAsync(AddRoleModel model);

        /// <summary>
        /// 修改角色权限
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task EditAsync(EditRoleModel model);

        /// <summary>
        /// 删除角色权限
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAsync(Guid id);

        /// <summary>
        /// 获取角色权限
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<List<RoleAuthorityDTO>> GetAsync(List<Guid> id);

        /// <summary>
        /// 获取一个层级
        /// </summary>
        /// <param name="parentId"></param>
        /// <returns></returns>

        Task<List<RoleAuthorityNextLevelListDTO>> GetOneLevelAsync(Guid? parentId);

        /// <summary>
        /// 获取树
        /// </summary>
        /// <returns></returns>
        Task<List<RoleTreeDTO>> GetTreeAsync();

    }
}